import hashlib


class MD5Utils(object):

    @staticmethod
    def encrypt(origin_str):
        """MD5加密"""

        if origin_str is None or len(origin_str) == 0:
            return None
        hash_obj = hashlib.md5(origin_str.encode('utf-8'))
        return hash_obj.hexdigest()

    @staticmethod
    def encrypt_16(origin_str):
        """MD5加密截断保留前16位"""
        return MD5Utils.encrypt(origin_str)[8:-8]


image_paths = ['F:\\image\\new_unsplash\\20231123\\2.jpg', 'F:\\image\\new_unsplash\\20231109\\web_20231109_164947.371407.jpg', 'F:\\image\\new_unsplash\\20231109\\web_20231109_164358.513670.jpg', 'F:\\image\\new_unsplash\\20231120\\Artificial Intelligence_20231120_152049.401603.jpg', 'F:\\image\\new_unsplash\\20231110\\tech_20231110_091013.413309.jpg', 'F:\\image\\new_unsplash\\20231109\\web_20231109_165328.132543.jpg', 'F:\\image\\new_unsplash\\20231120\\AI_20231120_185935.947607.jpg', 'F:\\image\\new_unsplash\\20231120\\Artificial Intelligence_20231120_152510.746886.jpg', 'F:\\image\\new_unsplash\\20231117\\team_20231117_162601.999016.jpg', 'F:\\image\\new_unsplash\\20231117\\team_20231117_162229.159150.jpg', 'F:\\image\\new_unsplash\\20231117\\team_20231117_161726.802862.jpg', 'F:\\image\\new_unsplash\\20231115\\website_20231115_160840.750039.jpg', 'F:\\image\\new_unsplash\\20231120\\Artificial Intelligence_20231120_151808.138818.jpg']
